<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>java script</title>
</head>
<body>
    <script>
        function ChangeImage()
        {
            element = document.getElementId("myimage");
            if(element.src.match("bulbon"))
            {
                element.src = "pic_bulbon.gif";
            }
            else element.src = "pic_bulboff.gif";
        }
    </script>
    
</body>
</html>